package com.ziiwee.reduce.commons.utils;

public class StringUtil {

    public static boolean isBlank(String value) {
        return value != null && value.length() == 0;
    }

    public static boolean notBlank(String value) {
        return value != null && value.length() > 0;
    }

    public static boolean hasLength(String value) {
        return notBlank(value);
    }

    public static String firstToUpperCase(String value) {
        String initials = value.substring(0, 1);
        String other = value.substring(1);
        return initials.toUpperCase() + other;
    }

    public static String firstToLowerCase(String value) {
        String initials = value.substring(0, 1);
        String other = value.substring(1);
        return initials.toLowerCase() + other;
    }

}
